package com.interceptor.mybatis.controller;

import com.interceptor.mybatis.configuration.UserConfiguration;
import com.interceptor.mybatis.pojo.User;
import com.interceptor.mybatis.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;
    @Autowired
    private UserConfiguration user;

    @GetMapping("/findUser")
    public List<User> findUser(){
        List<User> user = userService.findUser();
        return user;
    }
}
